package com.griddroid.messages;

import java.io.Serializable;

/**
 * Acknowledges that the {@link StartSessionRequestMessage
 * StartSessionRequestMessage} was received. Contains information about the port
 * to which the node should try to open a permanent connection to.
 * 
 * @author Charalampos Mavroforakis
 * @author Thomas Ailianos
 * @author Michail Michailidis
 * 
 */
public class StartSessionAckMessage extends GenericMessage implements Serializable
{

	private static final long serialVersionUID = 2766422664208618724L;
	/**
	 * the port which the server has reserved exclusively for the node to
	 * connect
	 */
	private int handlerPort;
	private String id;

	/**
	 * 
	 * @return the port in which the permanent connection will be established
	 */
	public int getHandlerPort()
	{
		return handlerPort;
	}

	public String getId()
	{
		return id;
	}

	public void setHandlerPort(int handlerPort)
	{
		this.handlerPort = handlerPort;
	}

	public void setId(String id)
	{
		this.id = id;
	}

	public StartSessionAckMessage(int port, String id)
	{
		this.id = id;
		this.handlerPort = port;
	}

}
